<!DOCTYPE html>
<html lang="zh">
<head>
  <meta charset="UTF-8">
  <title>可见光红外光谱仪</title>
  <link rel="stylesheet" href="/static/css/bootstrap.min.css">
  <link rel="stylesheet" href="/static/css/bbfont.css">
  <link rel="stylesheet" href="/static/css/style.css">
  <link rel="stylesheet" href="qv.css">
  <style>
    #viewer {
      background: transparent
    }

    .img {
      position: relative
    }

    .img > canvas {
      image-rendering: pixelated;
      position: absolute;
      top: 45px;
      left: 50px;
      width: calc(100% - 80px) !important;
      height: calc(100% - 60px) !important;
      border: 1px solid #222;
    }

    .img svg {
      font-size: 12px;
      font-weight: 100;
      font-family: revert
    }

    .img svg {
      position: absolute;
      height: 100%;
      width: 100%;
      /*background-color: #f003;*/
    }

    .img > * {
      border: 1px solid #ccc;
    }
    .imgs > div{
      width: 100%;
      height: 33.3%;
      flex-grow: 1;
      position: relative;
    }
    .img > div{
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
    }
    .V1 .IR{
      display: none;
    }
    .V2 .VI{
      display: none;
    }
    #img_viewer .unscan{
      display: none;
    }

  </style>
</head>
<body id="viewer">
<div id="CCC" style="padding: 4px 6px;">
  <button class="btn btn-primary btn-sm " id="realtime" onclick="main.realtime()">实时</button>
  <button class="btn btn-primary btn-sm  mx-1" id="history" onclick="main.onDay()">历史</button>
  日期:
  <input id="day" type="date" value="">
  任务:
  <select id="task" class="sele-comp">
  </select>
  <label for="" class="ps-1">模式</label>
  <select id="modes" class="sele-comp"></select>
  <label for="">最大帧:</label>
  <label id="frm_max"></label>
  <label for="">数据帧</label>
  <input id="frm_input" oninput="this.nextElementSibling.value=this.value" style="min-width: 60px" >
  <input oninput="this.previousElementSibling.value=this.value" style="max-width: 400px;padding:0;"
         id="frm_range" type="range" min="0" max="0" value="0" step="1">
  <div class="flex-grow-1"></div>
  <button class="btn btn-primary btn-sm"  onclick="main.exportCSV(this)"><i class="fa fa-file-text"></i>下载帧信息</button>
  <button id="frm_img_table" class="btn btn-primary btn-sm" style="display: none">L</button>
</div>
<div class="d-flex d-flex flex-row" style="height: calc(100vh - 40px);width: 100%">
  <div style="width: calc(100% - 350px); height: 100%;display: flex; flex-direction: row" class="V" id="img_viewer">
    <div style="width: 50%;height: 100%;flex-grow: 1" class="VI">
        <div class="CCC" style="border-left: 1px solid #ccc;border-right: 1px solid #ccc;border-bottom: 1px solid #ccc;">可见光
          <label>像元: </label><input id="vip" type="number" min=0 max="1023">
          <label>波段: </label><input id="vib" type="number" min="0" max="319"></div>
        <div style="height: calc(100% - 35px); width: 100%;position:relative" class="imgs">
          <div class="img">
            <svg></svg>
            <canvas id="vscan"></canvas>
            &nbsp;推扫图
          </div>
          <div class="img">
            <svg></svg>
            <canvas id="vspec"></canvas>
            &nbsp;光谱图
          </div>
          <div class="img" style="">
            <div id="vline"></div>
          </div>

        </div>
    </div>
    <div style="width: 50%;height: 100%;flex-grow: 1" class="IR">
        <div class="CCC" style="border-left: 1px solid #ccc;border-right: 1px solid #ccc;border-bottom: 1px solid #ccc;">短中波
          <label>像元: </label><input id="irp" type="number" min=0 max="511">
        <label>波段: </label><input id="irb" type="number" min="0" max="319"></div>
        <div style="height: calc(100% - 33px); width: 100%;position:relative"  class="imgs">
          <div class="img">
            <svg></svg>
            <canvas id="iscan"></canvas>
            &nbsp;推扫图
          </div>
          <div class="img">
            <svg></svg>
            <canvas id="ispec"></canvas>
            &nbsp;光谱图
          </div>
          <div class="img" style="">
            <div id="iline"></div>
          </div>
        </div>
    </div>
  </div>
  <div class="d-flex flex-column" style="width: 350px; height: 100%">
    <div class="card-header">
      数据
    </div>
    <div class="flex-grow-1  position-relative">
      <div class="position-absolute h-100 w-100" style="overflow-y: auto">
        <table id="params" class="table table-sm table-hover"></table>
      </div>
    </div>
  </div>


</div>
<script src="/static/js/jquery-3.6.0.min.js"></script>
<script src="/static/js/xtool.js"></script>
<script src="/static/js/echarts.4.9.js"></script>
<script src="qv.js"></script>
<script src="aviris.js"></script>
</body>
</html>